//
// Created by wujehy on 2020/8/3.
//

#include <cstdio>
#include "TestMod.h"
#include <handy/logging.h>

using handy::Logger;

TestMod::TestMod()
{
    fprintf( stderr, "init TestMod \n" );
}

int TestMod::type()
{
    return Type::Mod_Test;
}

int TestMod::depackage(int taskid, int type, void *data, int len, void *userdata)
{
    std::string message = std::string((char *) data, len );
    info( "TestMod  depackage : %s , type : %d  , %ld", message.c_str(), type, taskid );

    // -2 没有业务 上层 释放taskid
    return -2;
}

TestMod::~TestMod()
{
    fprintf( stderr, "delete TestMod \n" );
}

void TestMod::init_finished()
{

}
